<?php
	require("inc_all.php");
	$mei_ri = $GLOBALS['db']->select("select * from mei_ri_dan_ci limit 1");
	$dan_ci_list = $mei_ri[0]['id_dan_ci_list'];
	date_default_timezone_set('Asia/Shanghai');
//	if($mei_ri[0]['sj_geng_xin'] != date("Y-m-d"))
//	{
		$temp = $GLOBALS['db']->select("select id from bei_dan_ci");
		shuffle($temp);
		$id_dan_ci_list = $temp[0]['id'].','.$temp[1]['id'].','.$temp[2]['id'].','.$temp[3]['id'].','.$temp[4]['id'];
		$GLOBALS['db']->update(sprintf("update mei_ri_dan_ci set id_dan_ci_list = '%s', sj_geng_xin = '%s' where id = 1", $id_dan_ci_list, date("Y-m-d")));
//	}
	$attr = explode(",",$dan_ci_list);
	foreach($attr as $value)
	{
		$result = $GLOBALS['db']->select("select * from bei_dan_ci where id = ".$value);
		echo '<br/><br/><font color="red" size="6">'.$result[0]['dan_ci'].'</font>			'.$result[0]['ci_yi'];
	}
?>